﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharp.Study.Test
{
    public static class 集合取交集_并集_差集
    {
        public static void Go()
        {
            List<int> a = new List<int> { 1,2,3 };
            List<int> b = new List<int>() { 3,4,5 };

            var 交集 = a.Intersect(b).ToList();

            var 并集 = a.Union(b).ToList();

            var a差集b = a.Except(b).ToList();

            var b差集a = b.Except(a).ToList();

        }
    }
}
